home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
E
/
Extract.cpt
/
Extractor 1.0
/
card_3672.txt
< prev
next >
Wrap
Text File
|
1988-11-07
|
9KB
|
348 lines
-- card: 3672 from stack: in.0
-- bmap block id: 4083
-- flags: 0000
-- background id: 2755
-- name:
-- part 1 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=140 top=57 right=74 bottom=251
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Card Buttons
-- part 2 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=140 top=78 right=95 bottom=256
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Bkgnd Buttons
-- part 3 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=140 top=99 right=116 bottom=256
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Card Fields
-- part 4 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=140 top=120 right=137 bottom=251
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Bkgnd Fields
-- part 5 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=318 top=57 right=74 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Cards
-- part 6 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=318 top=78 right=95 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Backgrounds
-- part 7 (button)
-- low flags: 00
-- high flags: E005
-- rect: left=318 top=99 right=116 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Stack
-- part 8 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=196 top=182 right=242 bottom=343
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: extract
----- HyperTalk script -----
function LastPathComponent name
-- scan backwards for the last colon.
repeat with i = the length of name down to 1
if character i of name is ":" then exit repeat
end repeat
if i is 1 then
-- Name was of the form ":thing" or "thing". Check for leading
-- colon, and adjust if necessary. Done for generality.
if first character of name is ":" then
put 2 into i
end if
else
add 1 to i -- skip the colon
end if
-- Name was of the form "Thing:otherthing". Return "otherThing".
put empty into lastpath
repeat with j = i to the length of name
put character j of name after lastpath
end repeat
return lastpath
end LastPathComponent
on mouseUp
answer"Do extraction?" with "No" or "Yes"
if it is "No" then
exit mouseup
end if
put "** SELECT STACK TO EXTRACT SCRIPTS FROM **"
put filename ("STAK") into stackname
if stackname is empty then
exit mouseup
end if
put lastpathcomponent (stackname) into savef
put savef&" scripts" into savefile
put NewFileName ("Save scripts to...",savefile) into savefile
if savefile is empty then
exit mouseup
end if
open file savefile
---get vals of hilites
if hilite of card button 1 is true then
put true into cbh
else
put false into cbh
end if
if hilite of card button 2 is true then
put true into bbh
else
put false into bbh
end if
if hilite of card button 3 is true then
put true into cfh
else
put false into cfh
end if
if hilite of card button 4 is true then
put true into bfh
else
put false into bfh
end if
if hilite of card button 5 is true then
put true into ch
else
put false into ch
end if
if hilite of card button 6 is true then
put true into bh
else
put false into bh
end if
if hilite of card button 7 is true then
put true into sh
else
put false into sh
end if
---start extracting!
push card
set cursor to 4
visual effect dissolve to gray
visual effect dissolve to card
go to card id 4232
set lockscreen to true
go to stack stackname
write "SCRIPTS FROM STACK "&STACKNAME&RETURN to file savefile
write"_________________________________________________"&RETURN to file savefile
write return&RETURN to file savefile
if sh is true then ---get stack script
put "Doing stack..."
put script of this stack into stackscript
write "Stack Script:"&RETURN&RETURN to file savefile
write stackscript&RETURN to file savefile
write"_________________________________________________"&RETURN to file savefile
end if
if bh is true then
put "Doing backgrounds..."
repeat with x=1 to the number of backgrounds
write return to file savefile
put script of background x into backscript
put the name of background x into nameback
write"Script of background #"&x&" - "&nameback&return to file savefile
write return to file savefile
write backscript&return to file savefile
write"_________________________________________________"&RETURN to file savefile
end repeat
end if
if ch is true then
put "Doing cards..."
repeat with x=1 to the number of cards
go to card x
write return to file savefile
write "Script of card #"&x&" - "&name of card x&return to file savefile
put the script of card x into cardscript
write return to file savefile
write cardscript&RETURN to file savefile
write"_________________________________________________"&RETURN to file savefile
end repeat
end if
if bfh is true then
put "Doing Background fields..."
repeat with a=1 to the number of backgrounds
go to first card of background a
repeat with x=1 to the number of background fields
write return to file savefile
write"Script of bkgnd field #"&x&" - "&name of bkgnd field x&return to file savefile
write "This bkgnd field is in Background #"&a&" - "&name of background a&return to file savefile
put script of bkgnd field x into fieldscript
write return to file savefile
write fieldscript & RETURN to file savefile
write"_________________________________________________"&RETURN to file savefile
end repeat
end repeat
end if
if bbh is true then
put "Doing background buttons..."
repeat with a=1 to the number of background
go to first card of background a
repeat with x=1 to the number of background buttons
write return to file savefile
write "Script of bkgnd button #"&x&" - "&name of background button x & return to file savefile
write "This bkgnd button is in Background #"&a&" - "&name of background a&return to file savefile
put script of bkgnd button x into butscript
write butscript&return to file savefile
write"_________________________________________________"&RETURN to file savefile
end repeat
end repeat
end if
if cfh is true then
put"Doing all card fields..."
repeat with a=1 to the number of cards
go to card a
repeat with x=1 to the number of card fields
write return to file savefile
write "Script of card field #"&x&" - "&name of card field x & return to file savefile
write "Found in card # "&a&", in bkgnd "&name of this background&return to file savefile
put script of card field x into fieldscript
write return to file savefile
write fieldscript&return to file savefile
write"_________________________________________________"&RETURN to file savefile
end repeat
end repeat
end if
if cbh is true then
put "Doing all card buttons..."
repeat with a=1 to the number of cards
go to card a
repeat with x=1 to the number of card buttons
write return to file savefile
write "Script of card button #"&x&" - "&name of card button x &return to file savefile
write "Found in card #"&a&" - , in bkgnd "&name of this background &return to file savefile
put script of card button x into butscript
write return to file savefile
write butscript&return to file savefile
write"_________________________________________________"&RETURN to file savefile
end repeat
end repeat
end if
---all done!
set lockscreen to false
play "done"
pop card
close file savefile
hide message
end mouseup
-- part 9 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=248 top=302 right=325 bottom=290
-- title width / last selected line: 0
-- icon id / first selected line: 1016 / 1016
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: goback
----- HyperTalk script -----
on mouseUp
go to previous card of this background
end mouseUp